package com.qdu.servlet;


import com.qdu.entity.Journal;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.qdu.service.JournalService;
import com.qdu.service.impl.JournalServiceImpl;

/**
 * 处理查询所有日志基本信息请求
 *
 * @author Lenovo
 */
@WebServlet("/sads")
public class SearchAllDiaryServlet extends HttpServlet {

    JournalService journalService = new JournalServiceImpl();
    
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        List<Journal> list=journalService.findAllJournalInfo();
        
        req.setAttribute("journalList", list);
        req.getRequestDispatcher("/diary_list.jsp").forward(req, resp);
    }
}
